<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <!--<meta name="renderer" content="webkit|ie-comp|ie-stand">-->
    <!--<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">-->
    <meta name="applicable-device" content="mobile">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <link rel="Bookmark" href="../imgs/bai.ico"/>
    <link rel="Shortcut Icon" href="../imgs/bai.ico"/>
    <title>家政</title>
    <link rel="stylesheet" type="text/css" href="../css/index.css"/>
    <style type="text/css">
    </style>
</head>
<body>
    <!--列表-->
    <div id="list">
        <!--<div class="box">-->
            <!--<div class="img"></div>-->
            <!--<div class="title">项目名称</div>-->
            <!--<div class="price">项目价格</div>-->
            <!--<div class="gsprice">市场价格</div>-->
            <!--<div class="desc">项目描述</div>-->
        <!--</div>-->
    </div>

    <!--底部菜单-->
    <div id="menu"></div>

    <span id="msgPop"></span>
</body>
</html>


<script type="text/javascript" src="../js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="../js/view.js"></script>
<script type="text/javascript">
    var cw = document.documentElement.clientWidth;
    var ch = document.documentElement.clientHeight;
    var menu_id = 1;
    (function () {
        menuList();
        getList();
    })();
    function getList(){
        $.ajax({
            type: apis.fuwuList.method,
            url: apis.fuwuList.url,
            data: {},
            success: function (res) {
                console.log(res);
                if (res.code != 0) {
                    console.log(res.msg);
                }
                var d = res.data;
                var h = '', i;
                for (i = 0; i < d.length; i ++) {
                    h += '<div class="box">';
                    h += '<div class="img">';
                    if (d[i].thumb == '') {
                        h += '';
                    } else {
                        h += '<img src="' + d[i].prefixUrl + d[i].thumb + '"/>';
                    }
                    h += '</div>';
                    h += '<div class="title">【' + d[i].type_name + '】' + d[i].title + '</div>';
                    h += '<div class="price">';
                    h += '参考价：￥' + d[i].price;
                    h += '<span class="gsprice">市场价：￥' + d[i].gsprice + '</span>';
                    h += '</div>';
                    h += '<div class="desc">' + d[i].cnt + '</div>';
                    h += '';
                    h += '</div>';
                }
                h += '<div style="width: 100%; height: 50px;"></div>';
                $('#list').html(h);
            },
            error: function () {
                console.log('网络错误');
            }
        });
    }
</script>